/*******************************************************************************************
 *  Horizontal.c
 *
 *  Creating and managing Fire object strucutres.
 *
 *******************************************************************************************/







/*******************************************************************************************
 *  INCLUDES :
 *******************************************************************************************/

/* System and library related : */
#include <stdlib.h>
#include <string.h>

/* Project related : */
#include "Horizontal.h"







/*******************************************************************************************
 *  FUNCTIONS :
 *******************************************************************************************/

/*******************************************************************************************
 *  NEWHORIZONTAL : Creates an empty Horizontal object structure.
 *******************************************************************************************/
Horizontal *newHorizontal(void) {
	Horizontal *h;

	/* Creating the container structure : */
	h = (Horizontal *)malloc(sizeof(Horizontal));


	/* Setting the object's type : */
	h->otype = horizontal;


	/* Returning the still empty structure : */
	return h;

}




/*******************************************************************************************
 *  FREEHORIZONTAL : destroys an Horizontal object structure and all the objects it stores.
 *******************************************************************************************/
void freeHorizontal(Horizontal *h) {

	free(h->value);			/* Free the value string.  */
	free(h);				/* Free the object itself. */

}




/*******************************************************************************************
 *  SETHORIZONTALTYPE : sets the Horizontal object's type of acceleration.
 *******************************************************************************************/
void setHorizontalType(Horizontal *h, HrtType t) {
	h->type = t;
}



/*******************************************************************************************
 *  SETHORIZONTALVALUE : sets the Horizontal object's acceleration value.
 *******************************************************************************************/
void setHorizontalValue(Horizontal *h, char *value) {
	h->value = value;
}
